-- GENERATED SPELL FOR [Shadowmoon Warlock] --


function spell0_17371(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(32197,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17371', 26000, 1)
end

function spell1_17371(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(37113,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17371', 26000, 1)
end

function spell2_17371(pUnit, Event) --@Curse of Tongues,n/a--
pUnit:FullCastSpellOnTarget(13338,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17371', 15323, 1)
end

function spell3_17371(pUnit, Event) --@Fel Power,n/a--
pUnit:FullCastSpellOnTarget(33111,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17371', 15000, 1)
end

function spell4_17371(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17371', 3000, 1)
end

function spell5_17371(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15472,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17371', 3000, 1)
end

function Sorts_17371(pUnit, Event)
local choix_sorts_17371 = math.random(0, 5)
if choix_sorts_17371 == 0 then
pUnit:RegisterEvent('spell0_17371', 1, 1)
end
if choix_sorts_17371 == 1 then
pUnit:RegisterEvent('spell1_17371', 1, 1)
end
if choix_sorts_17371 == 2 then
pUnit:RegisterEvent('spell2_17371', 1, 1)
end
if choix_sorts_17371 == 3 then
pUnit:RegisterEvent('spell3_17371', 1, 1)
end
if choix_sorts_17371 == 4 then
pUnit:RegisterEvent('spell4_17371', 1, 1)
end
if choix_sorts_17371 == 5 then
pUnit:RegisterEvent('spell5_17371', 1, 1)
end
end

function mob17371_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17371', math.random(1500, 3000), 1)
end

function mob17371_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17371_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17371_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17371, 1, 'mob17371_Action')
RegisterUnitEvent(17371, 2, 'mob17371_Leave')
RegisterUnitEvent(17371, 3, 'mob17371_Kill')
RegisterUnitEvent(17371, 4, 'mob17371_Die')
